var path = {
    iNahooCss: 'css!./css/../../../../css/inahoo-0.0.4.css',
    styleCss: 'css!./css/../../../../css/style.css',
    api:'http://api.meizhanggui.cc/WenShen/'
    //api: 'http://123.57.42.13/WenShen/'
    //api: 'http://192.168.199.203/WenShen/'
};

var query, cache, config;

requirejs.config({
    baseUrl: './',
    paths: {
        jquery: 'js/lib/jquery/jquery-1.9.1.min',
        jsonp: 'js/lib/jquery/jquery.jsonp-2.4.0.min',
        dotdotdot: 'js/lib/jquery/jquery.dotdotdot.min',
        pingpp: 'js/lib/pingpp/pingpp_pay',
        routie: 'js/lib/routie/routie',
        juicer: 'js/lib/juicer/juicer-min',
        layer: 'js/lib/layer/layer',
        icheck: 'js/lib/icheck/icheck.min',

        text: 'js/lib/require/text',
        css: 'js/lib/require/css',

        router: 'js/main/router.js?' + new Date().getTime(),
        ex: 'js/main/ex',
        query: 'js/main/query',
        cache: 'js/main/cache',
        config: 'js/main/config'
    },
    priority: ['text', 'css'],
    shim: {
        jquery: {
            exports: "jquery"
        },
        jsonp: ['jquery'],
        dotdotdot: ['jquery'],

        routie: {
            exports: "routie"
        },
        juicer: {
            exports: "juicer"
        },
        pingpp: {
            exports: "pingpp"
        },
        layer: {
            deps: ['css!./js/lib/layer/skin/layer.css', 'jsonp'],
            exports: "layer"
        },
        icheck: {
            deps: ['css!./js/lib/icheck/red.css']
        }
    }
});

require(['jquery', 'jsonp','ex'], function () {
    require(['config'], function (config) {
        config.next(function(){
            require([
                'routie',
                'juicer',
                'layer',
                'cache',
                'query',
                'dotdotdot',
                path.iNahooCss,
                path.styleCss
            ], function () {
                require(['router'],function(){
                });
            });
        });
    })
});
